package com.xgst.readbook

import android.app.Application
import android.content.Context
import android.graphics.Color
import android.view.Gravity
import com.blankj.utilcode.util.CrashUtils
import com.blankj.utilcode.util.LogUtils
import com.blankj.utilcode.util.ProcessUtils
import com.blankj.utilcode.util.ToastUtils

class App:Application() {
    companion object{
        var context:Context? = null
    }

    override fun onCreate() {
        super.onCreate()
        if (ProcessUtils.isMainProcess()) {
            context = this
            LogUtils.getConfig()
                .setGlobalTag("ttt").isLog2FileSwitch = true
            CrashUtils.init()
            ToastUtils.getDefaultMaker()
                .setGravity(Gravity.CENTER, 0, 0)
                .setBgColor(Color.BLACK)
                .setTextColor(Color.WHITE)
                .setTextSize(18)
        }
    }
}